/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx.entity;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;


import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;


/**
 * <p>Project: smvc2022 - Student
 * <p>Powered by webrx On 2022-03-30 14:33:24
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
@Data
public class Student {
    @NotNull(message = "编号不能为空")
    @Max(value=66,message = "编号不能大于{value}")
    @Min(value=16,message = "编号不能小于{value}")
    private Integer id;

    @NotNull(message = "金额必须填写")
    @Range(min=1,max=10,message = "金额必须在{min} - {max}元之间")
    private Integer money;

    @NotNull(message = "姓名不能为空，必须填写")
    @Length(max = 5,min=2,message = "姓名字符串长度：必须在 {min} - {max}之间")
    private String name;
}
